Skip to content

fix(shader): gather a 3D image's image_gather4_lz from one slice as measured - #9183

Merged
oneandonlydean merged 14 commits into
boykopovar:mainfrom
fma-rc:fix/shader-gather-3d-volume
Nov 3, 2026
Merged

oneandonlydean merged 14 commits into
boykopovar:mainfrom
fma-rc:fix/shader-gather-3d-volume

Conversation

@fma-rc

@fma-rc fma-rc commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

image_gather4_lz through a 3D T# was emitted as OpImageGather on a 3D image, which SPIR-V does not allow (gathers take 2D, cube and rect images). NVIDIA's compiler dies on it with SIGILL, RADV crashes, and lavapipe refuses the pipeline (vkCreateComputePipelines: Vulkan result -13). Death Stranding 2 (PPSA02015) has such a compute shader (0xc280112c00) and stops there: NVIDIA with SIGILL at 157 s, the 680M with a crash (rc 139).

The hardware gathers four texels of one slice. Measured on a Radeon 610M (gfx1036) with the hardware oracle, 3742 rows over every clamp mode and border color:

  • each coordinate is reduced by its axis's clamp mode (wrap to [0,1), mirror to [0,2), otherwise clamped to [-4,4]; NaN reads as 0, infinities as -4 and 4), multiplied by the extent and 256 and rounded half up, exactly;
  • x and y take the texel pair around that point minus half a texel, z the slice that contains it; the order is (x0,y1), (x1,y1), (x1,y0), (x0,y0);
  • clamp modes address each texel; the half-border modes keep the pair together with its lower texel pinned to [-1, extent-1], and act as clamp to edge on z; border texels read transparent black, opaque black or white;
  • the sampler's LOD clamp, bias, filters and anisotropy are ignored, and the view's base level is read.

The recompiler now emits four OpImageFetch reads with that addressing. The sampler state reaches the shader as a specialization constant, or through the image's runtime metadata in registration modules. A border color table, a swizzled or integer texture with border addressing, image or sampler tables, unnormalized coordinates and samplers that disagree throw. The shader debt file records the measurement. Probes, results and the model check: evidence/gather-3d-volume (checkall.py matches all 3742 rows).

@mrfelek found the same shader in #5424 (comment) and fixed it on their fork (fix/volume-gather-lz), without a PR, with four level-zero samples at the footprint's texel centres, from a Radeon 780M measurement of the slice choice and of wrap and clamp on it. This PR fetches the texels instead, because the measurement above shows that the sampler's filters, LOD clamp and bias do not change a gather, and it adds the per-axis modes, the 1/256 snap, the half-border modes and the border colors.

Tested

Arch Linux, rebased on main 4f41f4c (2026-11-03, 3cb6fb3). With main's own new ImageResource fields the info encoder now counts 50 fields and the record stays 108 bytes. The two checks that expected the unimplemented border paths to throw are dropped. The FreeType submodule is main's again (my earlier rebase had moved it back to 2.13.3).

  • On this head, 112 image, shader and disk cache tests (agc_driver_image_*, agc_shader_*, agc_shader_disk_cache*) pass on the RTX 5080, RADV (Radeon 610M) and lavapipe, except three that skip on RADV (agc_driver_image_array_rows_past_layer_limit, agc_driver_image_array_window_past_layer_limit, agc_driver_image_table_vouched_lookups). The Windows build and ctest pass (3919 of 3919), with no failure the merge base lacks.
  • The wrapped texel index is reduced with an unsigned remainder: OpSRem with a negative operand is undefined in Vulkan without maintenance8, and the NVIDIA RTX 2000 Ada in CI returned 3 for -1 mod 7. agc_driver_image_gather_volume now also fails if the gather shader contains OpSRem or OpSMod; it fails at e92ec41 (test only) and passes with the fix.
  • @jotitadev ran the test on an Apple M2 Max with MoltenVK (review): with the merge base's recompiler it fails at pipeline creation (Metal has no 3D gather); with the PR it passes.
  • New test agc_driver_image_gather_volume: red channel, alpha and blue gathers over all eight clamp modes and three border colors, an odd 7x5x3 volume, per-axis modes, rounding ties and denormal coordinates, a 241-texel-wide volume at 1/256 boundaries, a base level, a swizzle, null images, a vertex-shader variant through the registration path, and a gather next to a 3D sample through another sampler. Expected values come from the measured model.
  • On main the test fails on every device: NVIDIA RTX 5080 SIGILL (132), Radeon 610M and 680M crash (139), lavapipe vkCreateComputePipelines: Vulkan result -13, llvmpipe rc 1. With the PR it passes on all five.
  • Each later fix is red without it and green with it on the RTX 5080, 610M, 680M, lavapipe and llvmpipe: per-axis modes, the registration path, z half border, and pairing the state only with the gather's own sampler. A null image divided by a zero extent; no device shows a wrong value for that, so the test checks the SPIR-V instead, which fails with main's extent and passes with the fix.
  • agc_driver_image_gather_one_dimensional, image_converted_unorm, image_sample_reduction, image_sint8, image_srgb_load, image_sample_unnormalized pass on main and with the PR on the RTX 5080, 610M and lavapipe.
  • Full suite on lavapipe: 1756 of 1763 pass; the 7 failures (conventions_env_reference, conventions_blob_reads, agc_driver_f64_denorm_preserve_spirv, agc_driver_f16_to_f32_unpack_spirv, the three net_dontwait_blocking_send*) fail the same way on the merge base on this machine.
  • Death Stranding 2, 400 s, hidden, on main with PR 5426, PR 7978, PR 6565, PR 6182, PR 8223 and our multisampled-target retire change, which it needs to reach this shader: without this PR the RTX 5080 stops with SIGILL in the shader compiler at 157 s and the 680M crashes; with it both run on to the next stop, color targets with fewer fragments than samples (EQAA) are unsupported (RTX 5080 at 86 s, frame 88; 680M at 228 s, frame 63, picture visible).
  • tools/check_conventions.py --base origin/main passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA02015 Death Stranding 2: On the Beach (PPSA02015) #5424
  • GPUs tested: NVIDIA RTX 5080 (driver 615.78.08, Linux), AMD Radeon 610M and 680M (RADV, Mesa 26.1.4 / 26.2.4, Linux), lavapipe, llvmpipe
  • AI-assisted: yes

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 5021 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5371 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5609 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 5925 core/shader/recompiler/ShaderDiskCache.cpp
PR 6235 docs/dev/debt/shader.md
PR 6280 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6412 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 6488 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6858 core/shader/recompiler/ShaderDiskCache.cpp
PR 6924 core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 6970 core/shader/recompiler/ShaderDiskCache.cpp
PR 7085 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7223 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7392 docs/dev/debt/shader.md
PR 7395 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7410 docs/dev/debt/shader.md
PR 7622 core/shader/recompiler/ShaderDiskCache.cpp
PR 7642 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7684 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 7689 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 8004 docs/dev/debt/shader.md
PR 8458 docs/dev/debt/shader.md
PR 8939 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9020 docs/dev/debt/shader.md
PR 9335 docs/dev/debt/shader.md
PR 9356 core/shader/recompiler/ShaderDiskCache.cpp
PR 9387 core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 9457 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9508 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9633 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9671 docs/dev/debt/shader.md
PR 9748 docs/dev/debt/shader.md
PR 9749 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9790 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9852 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 9889 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9897 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 9969 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 10000 core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 10049 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 10193 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 10233 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 10351 core/shader/recompiler/ShaderDiskCache.cpp
PR 10489 core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 10556 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 10652 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 10867 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 11483 docs/dev/debt/shader.md
PR 11551 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 11557 docs/dev/debt/shader.md
PR 12132 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 12299 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 12316 docs/dev/debt/shader.md
PR 12458 docs/dev/debt/shader.md
PR 12548 docs/dev/debt/shader.md
PR 12662 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 12764 core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 12790 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 12840 core/shader/recompiler/PipelineSpecialization.hpp
PR 12944 core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 12980 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 13517 core/shader/recompiler/ShaderDiskCache.cpp
PR 13928 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 13929 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 14032 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 14068 docs/dev/debt/shader.md
PR 14072 docs/dev/debt/shader.md
PR 14081 docs/dev/debt/shader.md
PR 14085 docs/dev/debt/shader.md
PR 14212 docs/dev/debt/shader.md
PR 14217 docs/dev/debt/shader.md
PR 14218 docs/dev/debt/shader.md
PR 14247 docs/dev/debt/shader.md
PR 14265 docs/dev/debt/shader.md
PR 14367 core/shader/recompiler/ShaderDiskCache.cpp
PR 14377 docs/dev/debt/shader.md
PR 14621 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 14627 docs/dev/debt/shader.md
PR 14628 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 14633 docs/dev/debt/shader.md
PR 14636 docs/dev/debt/shader.md
PR 14692 docs/dev/debt/shader.md
PR 14702 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 14793 docs/dev/debt/shader.md
PR 14795 docs/dev/debt/shader.md
PR 14821 docs/dev/debt/shader.md
PR 14830 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 14853 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 14871 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 14880 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
PR 14888 docs/dev/debt/shader.md
PR 14900 docs/dev/debt/shader.md
PR 14904 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 14909 docs/dev/debt/shader.md
PR 14913 docs/dev/debt/shader.md
PR 14944 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 14963 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 14964 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp

@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* labels Oct 21, 2026

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First Apple GPU / MoltenVK run. It confirms the bug here as a distinct vendor failure, shows the fix clears it, and surfaces one case in the new test that cannot run on this device.

Machine: Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. Vulkan loader + MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0). Release, BUILD_TESTING=ON.

Base/method: PR #8658 feat/macos-port @ a1fb8e3e9c (current main a6dcea9279 plus the macOS port), not main — main does not build on macOS. This PR's diff (git diff merge-base..df4fd534d -- . ':!docs') applied on top, clean.

Negative control (revert the production files to the PR's base, keep the new ImageGatherVolume.cpp): agc_driver_image_gather_volume fails at pipeline creation. MoltenVK translates the OpImageGather on a 3D image to MSL and Metal refuses it:

program_source:84:49: error: no member named 'gather' in 'metal::texture3d<float, metal::access::sample, metal::memory_coherence_threadgroup>'
    float4 _544 = spvDescriptorSet0.image_7[0u].gather(spvDescriptorSet0.samplers[0u], float3(...), component::x);
vkCreateComputePipelines: Vulkan result -3

So this is a fourth vendor's manifestation of the same bug the PR fixes: alongside the RTX 5080 SIGILL, the RADV crash and lavapipe's -13, MoltenVK rejects texture3d.gather at MSL compile with VK_ERROR_INITIALIZATION_FAILED.

With this PR: the shader compiles (the fix emits OpImageFetch instead), so the pipeline-creation failure is gone. The test then aborts on a Metal device limit, at the 3001-texel-wide volume case:

-[MTLTextureDescriptorInternal validateWithDevice:]:1421: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor has width (3001) greater than the maximum allowed size of 2048.'

Metal caps a 3D texture at 2048 on this GPU (maxImageDimension3D is 2048 on MoltenVK here), and the 1/256-boundary case asks for 3001, which trips a hard Metal assertion that takes down the whole test. The fix itself is fine on MoltenVK — the gather lowering compiles and the pipeline builds; it is the test that can't run to completion here. A maxImageDimension3D guard on the wide-volume case (skip, or clamp the width) would let it run on Apple and on any device with a 2048 3D limit.

I could not get the test past that case to check the gathered values on MoltenVK, so this is not a value check — only the compile (red→green) and the device-limit abort.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@fma-rc

fma-rc commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @jotitadev, the MoltenVK compile failure is a good fourth data point. You're right that 3001 was too wide: Vulkan only guarantees maxImageDimension3D of 256. a8779a3 moves that case to a 241 texel wide volume, which every device can create, with 32 new coordinates that each land a texel apart depending on whether u times the width is rounded to float before the 1/256 snap or taken exactly, the same property the 3001 inputs had. It passes on NVIDIA, RADV and lavapipe here and still fails at that case with the recompiler from before the exact product, so it should now run to the end on your M2.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardware evidence and the expanded coordinate/clamp coverage are unusually useful. I reviewed head a8779a382d3655ba1376b753cf76bc423247b56 and compiled the new focused test. I need two repository requirements completed before this is ready:

  1. The checklist says this is based on current main at a806c69bfe, but that is the merge base and the PR is 1,198 commits behind the current main (d6eafa54d0). The product build jobs for this head are skipped, so the reported device results do not validate the current merge base. Please update the branch, correct the checklist, and rerun the focused test against the updated code (or a current-main merge commit) on a supported host. My exact-head Release build of agc_driver_image_gather_volume_tests succeeded. I attempted its CTest run with lavapipe, but the test process exits before Vulkan initialization because this host's Intel Xeon E5-1620 v2 lacks the required LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA extensions. I therefore could not independently execute the value checks here.

  2. CONTRIBUTING.md requires the Game bring-up discussion to list the open PRs and local changes the title still needs. The current PPSA02015 discussion (#5424) does not list this PR. Please update it with #9183 and the outstanding work needed to reach the shader; the PR description says the reproduction also needs #8223, #9186 and the local multisampled-target-retire change.

Local checks on this head: git diff --check passed; the conventions command exited 0 with one warning that the new debt entry is 1,026 characters, over the 1,000-character guideline. The focused test target compiled. Its execution was blocked by this host CPU check, as described above.

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-ran a8779a3 on the M2 after the 241-wide change. The test now runs to the end on MoltenVK. The new wide case also fails without the exact product here, as it does on your GPUs.

Machine: Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. Release, BUILD_TESTING=ON.
Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704.
Base/method: PR #8658 feat/macos-port @ ee0a438415 (current main plus the macOS port), not main, which does not build on macOS. This PR's diff (git diff merge-base..a8779a382 -- . ':!docs') applied on top, clean. Full rebuild before each run.

  • With the PR: agc_driver_image_gather_volume passes 3 of 3 on both drivers. The Metal width (3001) greater than the maximum allowed size of 2048 abort from my earlier run is gone, so this is now a full value check on Apple, not just the compile.
  • Test only, production files at the merge base: fails on both drivers at pipeline creation with the same MSL error as before (no member named 'gather' in 'metal::texture3d<...>', vkCreateComputePipelines result -3).
  • Recompiler from before the exact product (production files at c4381c7, test from a8779a3): the full test fails earlier, at 3D gather of red, wrap: thread 26 component 0 is 98/255, expected 2/255, because that commit also predates the addressing-mode reduction. So I ran only the 241-wide case through a local one-off patch (not part of the PR). It fails on both drivers with 3D gather of red from a 241 texel wide volume at 1/256 texel boundaries: thread 0 component 0 is 243/255, expected 242/255. With the full PR, the same case alone passes 3 of 3.
  • Full ^agc suite with the PR: -j1 --timeout 30, 857 tests. Base: 17 failures with MoltenVK 1.4.2 and 16 with main + #2704. With the PR there is one more on each driver: agc_driver_uint8x4_color_target on 1.4.2 and agc_driver_cross_workgroup_flag on main + #2704. Both also fail intermittently on the base without this PR, with the same messages (a UINT16_ABGR export byte mismatch, and a workgroup did not see another workgroup's flag store). Neither involves a 3D gather. No timeouts.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@fma-rc
fma-rc force-pushed the fix/shader-gather-3d-volume branch from a8779a3 to 2e3fb7f Compare October 22, 2026 14:20
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@adriadam10 adriadam10 self-assigned this Oct 23, 2026
@adriadam10
adriadam10 force-pushed the fix/shader-gather-3d-volume branch from 2e3fb7f to 3f0d140 Compare October 23, 2026 22:43
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 24, 2026 10:21

Dismissing a stale review: the requested changes were addressed after it (new head and/or updated description with the asked-for runs) and the merge queue blocks on it. Please request changes again if anything is still open.

@wachi35676

Copy link
Copy Markdown
Contributor

Windows run on NVIDIA and the AMD proprietary driver, against current main aeff26b. Windows 11 10.0.26300, WinLibs GCC 15.2.0, Release; ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 (no validation layer installed here).

The merge onto current main doesn't build. Git merges 3f0d140 with no conflict, but main's 3ba1d39 ("answer image_get_resinfo on any T# dimension") also added an ImageResource field and changed the same assert to == 43. The two identical lines merge cleanly while the struct now has 44 fields:

core/shader/recompiler/ShaderDiskCache.cpp:144:43: error: static assertion failed: ImageResource changed: update the info encoder
note: the comparison reduces to '(44 == 43)'

It needs a merge of main with that assert at 44 (sizeof(ImageResource) == 96 still holds). With that one change made locally:

NVIDIA RTX 5070 Ti (621.01) AMD Radeon RDNA2 iGPU (AMD 2026.04.17)
gather / image tests from the description + disk_cache (14 entries) 14/14 14/14
agc_driver_image_gather_volume with main's core/shader process exits rc=3 with no message at the first 3D gather pipeline runs, wrong value: 3D gather of red, clamp to half border, transparent black: thread 0 component 1 is 0.000000/255, expected 1/255

So on Windows both drivers fail without this change too: NVIDIA crashes as it does on Linux, and AMD's driver accepts the 3D OpImageGather and computes a different footprint. Both pass with the four fetches. A wider set of 249 agc_ entries has no new failure.

AI-assisted: yes (Claude Code); results above were run on this machine.

@fma-rc
fma-rc force-pushed the fix/shader-gather-3d-volume branch from 3f0d140 to f2a7bda Compare October 25, 2026 23:31
@fma-rc

fma-rc commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @wachi35676, good catch. I rebased onto current main (49d1f9b) and set the count to 44 in f2a7bda; the earlier count commit dropped out because main already carries that line. agc_driver_image_gather_volume, image_sample_gather and the disk cache tests pass on NVIDIA, RADV and lavapipe here, and the Windows build and suite show no failure the merge base lacks.

@wachi35676

Copy link
Copy Markdown
Contributor

Re-checked head f2a7bdade314 merged onto main acb900c19 (no conflict). Windows 11 10.0.26300, WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.

  • It builds now. ShaderDiskCache.cpp:144 has fieldCount<ImageResource>() == 44, and the (44 == 43) failure from my earlier run is gone.
  • The gather and image tests from my earlier run plus disk_cache pass 14/14 on the RTX 5070 Ti and 14/14 on the AMD RDNA2 iGPU. The five gather entries pass 3/3 on each, and agc_driver_image_gather_volume prints image 3D gather tests passed on both.
  • check_conventions.py passes.

AI-assisted: yes (Claude Code); results above were run on this machine.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 27, 2026
@fma-rc
fma-rc force-pushed the fix/shader-gather-3d-volume branch from f2a7bda to 0e27704 Compare October 27, 2026 05:09
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 27, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@fma-rc thanks for this one. We keep tests to real behaviour and argument validation, not asserting that a not-yet-implemented call throws, since that kind of test breaks the moment someone implements the function. In core/libs/prx/libSceAgcDriver/tests/execution/ImageGatherVolume.cpp please drop the two RunThrows checks (the 3D gather with a border color table, and the swizzled volume with border addressing) and the RunThrows helper that only they use, because both are still unimplemented paths in SpirvImageEmitter.cpp. The measured gather cases can stay.

@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: failed

PR head 345441c merged onto main 2517aa0 · tested 2026-11-02 09:58 UTC · 41 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ❌ 3,115 passed · 9 failed (2 new: 1 pass on main with the PR's tests, 1 fail on main with the PR's tests too, 3 also fail on main, 4 unstable on main) · 51 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Vulkan validation ✅ no new validation IDs vs main (1245 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_bda_device 83.8 s, ⚠️ agc_driver_graphics 40.5 s, ⚠️ agc_driver_graphics_maps_fallback 35.1 s

Failing tests

This PR changes test files, so each failing test was also built and run on main with only the PR's test changes applied. ✅ there means the failure comes from the PR's other changes; ❌ means the test fails on main too, so this run does not show the PR caused it.

Test With this PR Same test on main 2517aa0 (main + this PR's test changes only)
agc_driver_image_gather_volume ❌ failed ❌ also fails
guest_freetype ❌ failed ✅ passed
agc_driver_image_gather_volume: Failed (also failed when re-run alone), assertion and diagnostics
ctest: Failed

AGC graphics: 3D gather of blue from a 7x5x3 volume, wrap: thread 5 component 0 is 251.000000/255, expected 248/255
guest_freetype: Subprocess aborted (also failed when re-run alone), assertion and diagnostics
ctest: Subprocess aborted

FreeType check failed at line 907
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_job_manager_compute_capacity: failed in 1 of the last 10 main runs
agc_driver_pipeline_journal: failed in 2 of the last 10 main runs
agc_submit_progress: failed in 8 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_image_gather_volume
guest_freetype
Validation IDs already present on main (5 IDs in 717 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (717 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 709 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (51)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or pla
Reproduce
git fetch origin 345441cf8ab46392eec858b9a2cf7ae66e3720e6 2517aa02f78e00b8b06ae5ff4206a8c04e22a1cb
git checkout 2517aa02f78e00b8b06ae5ff4206a8c04e22a1cb && git merge --no-ff 345441cf8ab46392eec858b9a2cf7ae66e3720e6
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1
# the failing tests, on this merge and on main:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc_driver_image_gather_volume|guest_freetype)$' --parallel 1 -V

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi fma-rc,

A follow-up to the FreeType note. The NVIDIA GPU run at 345441c (merged onto main 2517aa0, RTX 2000 Ada, driver 595.99.02) shows two failures:

  • guest_freetype aborts ("FreeType check failed at line 907") and passes on main with only your test changes. That is the FreeType 2.13.3 downgrade from the earlier comment, so restoring 3rdparty/freetype should clear it.
  • agc_driver_image_gather_volume, the new test in this PR, fails on NVIDIA: "3D gather of blue from a 7x5x3 volume, wrap: thread 5 component 0 is 251.000000/255, expected 248/255". It also fails when re-run alone. Could you look at the wrap case on NVIDIA, and post the test result on the hardware you used along with the next push?

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 2, 2026
fma-rc added 14 commits November 3, 2026 12:36
…nd keep z half border out of border handling

A 3D sample of the same image through another sampler no longer feeds the gather's
state, z modes 4 and 5 no longer count as border addressing, a null image no
longer divides by a zero extent, and the test covers per-axis modes, rounding
ties, denormals, null images and the vertex stage.
…l descriptor field in the disk cache info encoder
@fma-rc
fma-rc force-pushed the fix/shader-gather-3d-volume branch from 345441c to 3cb6fb3 Compare November 3, 2026 12:57
@fma-rc

fma-rc commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks, @oneandonlydean, both were mine. The FreeType pointer came in through my rebase (a commit that picked up a submodule I had not updated); a new commit puts 3rdparty/freetype back to main's, so the PR no longer touches it. That was also the Windows guest_freetype failure I called unrelated in my previous comment, so that note was wrong.

The wrap failure: the shader reduced a texel index of -1 with OpSRem, which Vulkan leaves undefined for a negative operand unless maintenance8 is enabled. The RTX 2000 Ada gave -1 mod 7 = 3, so it read texel 3 instead of 6. The index is never below -1 there, so the fix adds one period and uses OpUMod. My RTX 5080 happened to return 6, so the test now also fails whenever the gather shader holds an OpSRem or OpSMod; at the test-only commit e92ec41 it fails on the RTX 5080.

At 3cb6fb3 (rebased on main 4f41f4c): the 112 image, shader and disk cache tests pass on the RTX 5080, RADV (Radeon 610M) and lavapipe (three skip on RADV), and the Windows build and ctest pass 3919 of 3919.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — approved

The 3D image_gather4_lz lowering merges cleanly, builds, and passes the focused image, gather and disk cache tests on lavapipe. The new test fails with main's recompiler. Two things were not checked here: the measured hardware model (no AMD GPU on this machine) and the bring-up list. The only new validation IDs come from main's sampler creation, not from this change.

What I ran

Head 3cb6fb3ebb3fa6d30b8a373c3a006504f6247445, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 8d1e202a94108a3eba9754cfc8d4744b136fc146. Debian 13 VM (Xeon Gold 6136, AVX2/FMA), GCC 14.2.0, Release, Ninja. Vulkan was lavapipe (Mesa 26.1.6, LLVM 19); there is no GPU.

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...3cb6fb3ebb3fa6d30b8a373c3a006504f6247445
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R '^agc_driver_image_gather_volume$'
# negative control: the 8 production files restored from main
ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build --output-on-failure -R '^agc_driver_image_gather_volume$'
# merged files restored, full rebuild
ninja -C build -j32 -l32
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R 'gather|disk_cache|agc_driver_image_sample|agc_driver_image_table|shader_info|resource_tracker|descriptor_binding'
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs (script) ok
Script test run (2163 tests) no new failures, no timeouts; 7 known failures that also fail on main
Focused run (28 tests: gather, image sample, image table, disk cache) 27 passed, 1 skipped (agc_driver_image_sample_lod_clamp, a device limitation)
agc_driver_image_gather_volume passes in about 9.4 s on lavapipe with validation (limit is 30 s)
Validation layer loaded; 8 new VUID- lines, all in the new test, all from vkCreateSampler with MIRROR_CLAMP_TO_EDGE (see Non-blocking)
Worktree after the control git status --porcelain empty
New validation IDs in agc_driver_image_gather_volume
Validation Error: [ VUID-VkSamplerCreateInfo-addressModeU-parameter ]
vkCreateSampler(): pCreateInfo->addressModeU (VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE) requires the extensions VK_KHR_sampler_mirror_clamp_to_edge.
Validation Error: [ VUID-VkSamplerCreateInfo-addressModeV-parameter ] ...
Validation Error: [ VUID-VkSamplerCreateInfo-addressModeW-parameter ] ...
Validation Error: [ VUID-VkSamplerCreateInfo-addressModeU-01079 ]
vkCreateSampler(): pCreateInfo->addressModeU is VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE but the VK_KHR_sampler_mirror_clamp_to_edge extension or samplerMirrorClampToEdge feature was not enabled.

Negative control

I restored the eight production files from main: Resources.hpp, ResourceMaterializer.hpp/.cpp, DescriptorBindingBuilder.cpp, ResourceTracker.cpp, PipelineSpecialization.hpp, ShaderDiskCache.cpp and SpirvImageEmitter.cpp. I kept the new test and rebuilt it. It fails on the first case:

Output
ShaderRecompiler::Recompile: SPIR-V validation before optimization failed:
level=2 word=607: [VUID-StandaloneSpirv-OpImage-04777] Expected Image 'Dim' to be 2D, Cube, or Rect
  %531 = OpImageGather %v4float %529 %518 %uint_0

This matches the description's lavapipe result on main (pipeline refused). I then restored the merged files, rebuilt everything, and the test passed again.

Findings

Blocking

None.

Non-blocking

  • The new test hits main's missing samplerMirrorClampToEdge enablement (core/libs/prx/libSceAgcDriver/Graphics/src/GuestSamplerResource.cpp:32-44).
    • The test's mirror-once samplers (guest clamp modes 3, 5 and 7) go to VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE through toVkAddressMode.
    • Nothing under core/ enables samplerMirrorClampToEdge or VK_KHR_sampler_mirror_clamp_to_edge.
    • The PR does not touch this code, and the gather itself never reads the sampler (it fetches). The 8 VUIDs therefore come from main and are listed as new only because the test does not exist there.
    • They still mean undefined behaviour in vkCreateSampler for every guest sampler with those modes. Fixing it is a separate change: enable the feature, or throw when it is unavailable. It is worth a debt entry or a follow-up issue.
  • Unverified hardware claims are mentioned only in the debt entry. The debt entry in docs/dev/debt/shader.md correctly says the model comes from gfx1036, not the PS5's gfx1013. The 4.0 clamp bound and the half-border pinning are the parts most likely to differ between RDNA2 parts. A later run on a second RDNA2 GPU would firm them up. Not required for this PR.

Earlier review points, checked on this head:

  • The RunThrows checks are gone.
  • 3rdparty/freetype is no longer in the diff.
  • The NVIDIA wrap failure from the RTX 2000 Ada run is addressed: the index reduction in SpirvImageEmitter.cpp:925-928 adds one period and uses OpUMod with a nonzero divisor (the extent is UMax(size, 1)). The test rejects any OpSRem or OpSMod in the gather shader.

I also checked by hand:

  • The exact snap in EmitVolumeGatherLz (SpirvImageEmitter.cpp:839): the rounding bias for negative values, the 64-bit shift split at shift 32, and denormals.
  • That the 11-bit gather state fits RuntimeAbi::CompareStateMask (13 bits) for registration modules.
  • That the disk cache picks up the changed encoding through the generated source version.

Not verified

  • Hardware model: I could not check the measured model (the 1/256 snap, half-border pinning, slice choice, border colors) against hardware: there is no AMD GPU here, and the evidence branch is outside the repository, so I did not rerun checkall.py. Everything here is lavapipe only.
  • Other vendors: NVIDIA, RADV and MoltenVK results come from the author and other commenters, not from me.
  • Bring-up list: I could not check whether the PPSA02015 bring-up discussion (#5424) now lists this PR, which an earlier review asked for (no network).
  • In-game behaviour: not run (no titles are launched here).

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 3cb6fb3 merged onto main 4f41f4c · tested 2026-11-03 13:45 UTC · 39 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,697 passed · 10 failed (0 new, 8 also fail on main, 2 unstable on main) · 58 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,765 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (933 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ public_headers 72.8 s, ⚠️ agc_driver_image_sample_unnormalized 58.0 s, ⚠️ agc_driver_lazy_resolved_abi 53.9 s, ⚠️ agc_driver_sample_multisample_target 38.4 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
agc_driver_store_over_untracked: failed in 1 of the last 9 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_image_gather_volume
Validation IDs already present on main (4 IDs in 516 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (516 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 508 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (58)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayW
Reproduce
git fetch origin 3cb6fb3ebb3fa6d30b8a373c3a006504f6247445 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 3cb6fb3ebb3fa6d30b8a373c3a006504f6247445
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 3cb6fb3 merged onto main 4f41f4c · tested 2026-11-03 13:48 UTC · 32 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,710 passed · 7 failed (0 new, 3 also fail on main, 4 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,765 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (933 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_driver_submit_progress: failed in 5 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 5 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_image_gather_volume
Validation IDs already present on main (4 IDs in 516 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (516 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 508 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin 3cb6fb3ebb3fa6d30b8a373c3a006504f6247445 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 3cb6fb3ebb3fa6d30b8a373c3a006504f6247445
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 3, 2026
@oneandonlydean
oneandonlydean merged commit 0bf0563 into boykopovar:main Nov 3, 2026
16 of 17 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants